<%@page contentType="text/html;charset=gb2312" language="java" import="java.sql.*,java.util.*" 	errorPage=""%>
<html>
  <head>
    <title>无标题文档</title>
  </head>
  <body>
    <%
       int n=0;
		//获取application对象索引值是count的对象，并赋给counter
       String counter = (String)application.getAttribute("count");  
       if(counter!=null)                 //如果counter不为空
       n = Integer.parseInt(counter);        //将counter值转换为整形，并赋给n
       
       n=n+1;
       out.print("第"+n+"次访问<br/>");
       counter = String.valueOf(n);         //返回string类型的n的值，并赋给counter
       //将对象counter添加到application中，并为其指定索引关键字count
       application.setAttribute("count", counter);
       
       
       application.setAttribute("user", "张三");
       out.println("<br/>新增测试用户:"+application.getAttribute("user"));
       application.removeAttribute("user");
       out.println("<br/>删除测试用户:"+application.getAttribute("user"));
       
     /*   Enumeration enu = application.getAttributeNames(); //获取数据集
       while(enu.hasMoreElements()){
		String Name = (String)enu.nextElement();	
		  out.println("参数名称："+Name);
		out.println("参数内容："+application.getAttribute(Name));	
		}  */
		
    %>
  </body>
</html>
